//
//  RxBMKLocationManagerDelegateProxy.swift
//  RxObjectDemo
//
//  Created by CaryaLiu on 2021/2/23.
//

import RxSwift
import RxCocoa

extension BMKLocationManager: HasDelegate {
    public typealias Delegate = BMKLocationManagerDelegate
}

public typealias RxBMKLocationManagerDelegate = DelegateProxy<BMKLocationManager, BMKLocationManagerDelegate>
open class RxBMKLocationManagerDelegateProxy: RxBMKLocationManagerDelegate, DelegateProxyType, BMKLocationManagerDelegate {
    /// Type of parent object
    public weak private(set) var manager: BMKLocationManager?
    /// Init with ParentObject
    public init(parentObject: ParentObject) {
        manager = parentObject
        super.init(parentObject: parentObject, delegateProxy: RxBMKLocationManagerDelegateProxy.self)
    }
    /// Register self to known implementations
    public static func registerKnownImplementations() {
        self.register { parent -> RxBMKLocationManagerDelegateProxy in
            RxBMKLocationManagerDelegateProxy(parentObject: parent)
        }
    }
}
